<%@ page import="POJO.Person" %><%--
  Created by IntelliJ IDEA.
  User: Lxy
  Date: 2018/11/2
  Time: 16:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="../base/jquery-3.3.1.min.js"></script>
    <%
        Person person=(Person) request.getAttribute("person");
        if(person!=null){
            out.print("姓名"+person.getName());
            out.print("年龄"+person.getAge());
        }
    %>
</head>
<body>
<form action="/toPerson" method="post">
    姓名:<input type="text" name="name"><br>
    年龄：<input type="text" name="name"><br>
    出生日期：<input type="date" name="name"><br>
    创建日期：<input type="date" name="name"><br>
    <input type="submit" value="提交">

</form>
<button id="btn">b提交</button>
</body>
<script>
$(function(){
$("#btn").click(function () {
   $.ajax({
    url: "/getTest",
    type: "post",
    data: {
        name1: "张三"
    },
    success: function (data) {
        console.log(data);
    }
});
});
})

</script>
</html>
